<template>
  <div class="swiper-container">
    <swiper :options="swiperOptions">
      <swiper-slide v-for="item in 10" :key="item">
        <div class="swiper-item">图片:{{ item }}</div>
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
import { swiper, swiperSlide } from "vue-awesome-swiper"
import "swiper/dist/css/swiper.css"

export default {
  data () {
    return {
      swiperOptions: {
        pagination: {
          el: ".swiper-pagination"
        },
        autoplay: {
          delay: 3000
        },
        loop: true
      }
    }
  },
  components: {
    swiper,
    swiperSlide
  }
}
</script>

<style lang="stylus" scoped>
.swiper-container >>> .swiper-pagination-bullet
  background #fff
.swiper-container
  height 150px
  background #e74c3c
  .swiper-item
    height 100%
    line-height 150px
    text-align center
    font-size 1rem
</style>
